package zhupf.test.designPattern.decorator;

import lombok.Data;

@Data
public class Decorator extends Drink {

    private Drink drink;

    public Decorator(Drink drink){
        this.drink = drink;
    }


    @Override
    public String descript() {
        return drink.descript()+this.getDes()+this.getPrice();
    }

    @Override
    public float cost() {
       return drink.cost()+super.getPrice();
    }
}
